//
//  XMPPTool.h
//  WeChat
//
//  Created by wangcarl on 16/8/29.
//  Copyright © 2016年 wangcarl. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Singleton.h"
#import "XMPPvCardTempModule.h"
#import "XMPPvCardCoreDataStorage.h"
#import "XMPPRoster.h"
#import "XMPPRosterCoreDataStorage.h"
#import "XMPPMessageArchiving.h"
#import "XMPPMessageArchivingCoreDataStorage.h"




typedef enum {
    XMPPResultTypeLoginSucess,
    XMPPResultTypeLoginFailure,
    XMPPResultTypeRegisterSucess,
    XMPPResultTypeRegisterFailure
}XMPPResultType;

typedef void(^XMPPResultBlock)(XMPPResultType);
@interface XMPPTool : NSObject
singleton_interface(XMPPTool);
@property (nonatomic,assign,getter=isRegister)BOOL registerOperation;

@property(strong,nonatomic,readonly)XMPPvCardAvatarModule *avatar;

@property(strong,nonatomic,readonly)XMPPStream *xmppStream;


@property(strong,nonatomic,readonly)XMPPRoster *roster;
@property(strong,nonatomic,readonly)XMPPRosterCoreDataStorage *rosterStorage;


@property(strong,nonatomic,readonly)XMPPvCardCoreDataStorage *vCardStorage;
@property(strong,nonatomic,readonly)XMPPvCardTempModule *vCard;



@property(strong,nonatomic,readonly)XMPPMessageArchiving *msgArchiving;
@property(strong,nonatomic,readonly)XMPPMessageArchivingCoreDataStorage *msgArchivingStorage;



-(void)xmppLogin:(XMPPResultBlock)resultBlock;
-(void)xmppRegister:(XMPPResultBlock)resultBlock;

-(void)xmppLogout;

@end
